{extend name="base" /}
{block name="title"}国内高匿免费HTTP代理IP|程序员的收藏夹-专注于程序员学习、分享{/block}


{block name="header"}
	{include file="public/user_header" /}
{/block}

{block name="content"}
<div class="zbd-content">
	<div class="slider" data-slider-time="200000" data-slider-ani="fade" data-slider-arrow="false" data-slider-button="false">
		<div class="slider-item"><img src="http://pic.zhengbingdong.cn/upload/20220330/0a2fb2c230b0c9944bb462a9fb6aa5e5.png"></div>
		<div class="page ip-zbd">
			<div class="ip-til">国内高匿免费HTTP代理IP</div>
			<div class="ip-til-2">安全  稳定  快速  海量  便捷</div>
			<div class="ip-til-2">支持：HTTP、HTTPS、SOCKS5</div>
			<div class="ip-til-3"><button type="button" class="btn bg-red"><i class="icon ice-download"></i>免费获取接口API</button></div>
		</div>
	</div>
	
	<div class="page mt40">
		<div class="title-c">代理声明</div>
		<div class="tip bg-blue">
			<div class="text-center doc-intro black">免费代理是第三方代理服务器，收集自互联网，并非[本站]所有，本站不对免费代理的有效性负责</div>
			<div class="text-center doc-intro black">所有IP来自同行收集发布，仅用于学习分享，平台不保证IP的准确性、不承担任务法律责任</div>
			<div class="text-center doc-intro black">若免费代理侵犯了您的权益，请通过站长及时告知，本站将在第一时间删除</div>
		</div>

		<div class="row mt40">
			<div class="w6 text-right ip-h3">今日更新IP数</div>
			<div class="w6 ip-h3">总IP池数量</div>
			<div class="w6 text-right ip-h4 ani-num red">{$todayCount|default='0'}</div>
			<div class="w6 ip-h4 ani-num red">{$ipCount|default='0'}</div>
		</div>
		<table class="table table-border mt40" data-table-sort="0,1">
		    <thead>
		        <tr>
		            <th>IP</th>
		            <th>PORT</th>
		            <th>匿名度</th>
		            <th>类型</th>
		            <th>位置</th>
		            <th>响应速度</th>
		            <th>最后验证时间</th>
		        </tr>
		    </thead>
		    <tbody id="ipList">
		        
		    </tbody>
		</table>

		<div class="row" id="gengduo">
			<div class="gengduo cursor-pointer blue JS-next">
				<span id="loadtext">切换下一页</span>
				<span class="icon ice-arrow-triangle-b"></span>
				<span><i class="crepage red">1</i> / {$pageTotal}</span>
			</div>
		</div>

	</div>
	<input type="hidden" id="page" value="0">
</div>
<script type="text/javascript">
	ice(function(){

		getList();

		// 点击下一页
		ice(".JS-next").click(function(e) {
			ice("#loadtext").html('正在努力加载中...')
			getList();
		})

		// 请求接口
		function getList()
		{
			var pages = parseInt(ice("#page").val()) + 1;

			ice.ajax({
			    url:'/ip/ipList',
			    type:'get',
			    data: {
			    	page: pages
			    },
			    success:function(res){
			    	ice("#loadtext").html('切换下一页')
			    	if(res.code == 1){
			    		ice.pop({content:res.message,icon:'fail'})
			    		return false

			    	} else{

				    	var content = '';
				    	var data = res.data
				    	for (var i = 0; i < data.length; i++) {
				    		content += '<tr>'
					            content += '<td>'+data[i]['ip']+'</td>'
					            content += '<td>'+data[i]['port']+'</td>'
					            content += '<td>'+data[i]['desc']+'</td>'
					            content += '<td>'+data[i]['type']+'</td>'
					            content += '<td>'+data[i]['addr']+'</td>'
					            content += '<td>'+data[i]['ck_time']+'</td>'
					            content += '<td>'+data[i]['speed']+'</td>'
					        content += '</tr>'
				    	}

				    	if(res.data.length == 0){
				    		ice.pop({content:'数据全部加载完'})
				    		return false;
				    	}

			    		ice("#ipList").html(content)
			    		ice("#page").val(pages)
    					ice(".crepage").html(pages)
			    		
			    	}
			    }
			});
		}
	})
</script>
{/block}